home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 8
/
Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso
/
Aminet
/
comm
/
fido
/
showfigfonts.lha
/
showfigfonts.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-08-20
|
2KB
|
59 lines
/* !/bin/sh -
showfigfonts by Glenn Chappell <ggc@uiuc.edu>
figlet release 2.1.1 -- 25 Aug 1994
Based on showfigfonts by Greg Galperin <grg@ai.mit.edu>, Nov 1993.
ShowFigFonts.rexx by Roger Clark -- 20 August 1995
Prints a list of available figlet fonts, along with a sample of each
font. If directory is given, lists fonts in that directory; otherwise
uses the default font directory. If word is given, prints that word
in each font; otherwise prints the font name.
Usage: showfigfonts [ -d directory ] [ word ] */
Options Results
Parse Arg Arguments
WordToType = ""
FontDir = "Figlet:Fonts"
Call Pragma("W","N")
Usage="Usage: RX ShowFigFonts.rexx [ -d directory ] [ word ]"
If Upper(word(Arguments,1))="-D" then Do
FontDir = Word(Arguments,2)
If Words(Arguments) = 3 then WordToType = Word(Arguments,3)
If Words(Arguments) > 3 | Words(Arguments) <2 then Do
Say Usage
Exit 1
End
End
Else Do
WordToType = Word(Arguments,1)
If Words(Arguments) > 1 then Do
Say Usage
Exit 1
End
End
Call Open(Out,"Ram:FigletTemp","W")
Call WriteLn(Out,WordToType)
Call Close(Out)
FontList=ShowDir("Figlet:Fonts","File")
do Loop = 1 to Words(FontList)
If Upper(Right(Word(FontList,Loop),4)) ~= ".FLF" then Iterate
If WordToType = "" then Do
Call Open(Out,"Ram:FigletTemp","W")
Call WriteLn(Out,Word(FontList,Loop))
Call Close(Out)
End
Say Word(FontList,Loop)
Say
Address Command "Figlet:Figlet -d "FONTDIR" -f "Word(FontList,Loop)" <Ram:FigletTemp"
Say
Say
End
Address Command "Delete Ram:FigletTemp Quiet"
Exit